package com.gict.antifraudback.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.gict.antifraudback.entity.Config;
import com.gict.antifraudback.service.ConfigService;
import com.gict.antifraudback.mapper.ConfigMapper;
import org.springframework.stereotype.Service;

/**
* @author XIE
* @description 针对表【config(配置表)】的数据库操作Service实现
* @createDate 2023-12-06 10:48:57
*/
@Service
public class ConfigServiceImpl extends ServiceImpl<ConfigMapper, Config>
    implements ConfigService{

    @Override
    public Config getByName(String name) {
        LambdaQueryWrapper<Config> wrapper = Wrappers.lambdaQuery();
        wrapper.eq(Config::getName, name);
        return getOne(wrapper);
    }
}




